#阶乘函数
def factorial(num):
    if num == 1:
        return 1
    else:
        return num * factorial(num - 1)
#调用函数
num = 5
print(f"{num}的阶乘是：", factorial(num))
print()


#2.汉诺塔问题
def 